package com.example.databindingdemo;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.library.baseAdapters.BR;

public class Bean extends BaseObservable {
    private int id;
    private String likename;

    public Bean() {
    }
    public Bean(int id, String likename) {
        this.id = id;
        this.likename = likename;
    }
    @Bindable
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
        notifyPropertyChanged(BR.id);
    }
    @Bindable
    public String getLikename() {
        return likename;
    }

    public void setLikename(String likename) {
        this.likename = likename;
        notifyPropertyChanged(BR.name);
    }
}
